#include <iostream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
class Utils
{
public:
#define SEP "\r\n"
#define STRLENSEP strlen(SEP)
    // 将http请求切分成一行一行，push进一个输出型参数vector中
    // 返回第一行的内容
    static void CutRequset(string requst,vector<string> &vec,string sep = SEP,int len = STRLENSEP)
    {
        int start = 0;
        while (start <= requst.size())
        {
            int pos = requst.find(sep,start);
            if (pos == string::npos)
                break;
            string tem = requst.substr(start,pos - start);
            vec.push_back(tem);
            start += tem.size();
            start += len;
        }
    }
};